<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<LINK href="<?=$this->styleurl?>/images/index.css" type=text/css rel=stylesheet />
</head>
<body>
<TABLE width="100%" height="90" border=0 cellPadding=0 cellSpacing=0 CALLPADDING="0">
	<tr><td height="20px"><b>相片列表</b></td></tr>
	<TR BORDER="0" WIDTH="100%">
	<?php
	$p = isset($_GET["p"]) ? intval($_GET["p"]) : 1;
	$p < 1 && $p = 1;
	$i = 0;
	$j = $i+($p-1)*15;
	foreach ($this->paginator as $row){
	?>
	 <TD height=30 colspan="2" align=left vAlign=top bgColor=#ffffff style="PADDING-LEFT: 8px; PADDING-TOP: 8px"><p>
	 <form name="form3" action="<?=$this->adminurl?>/photo/submitpho" method="POST">
		 <table width="122" border="0" cellspacing="0" cellpadding="0">
	  		<tr>
	   			<td width="120" height="90"><div class="imgs1" style="margin:2px; padding:2px; border:#CCCCCC 1px solid;"><img border="0" id="<?=$row["pho_id"]?>" src="<?php echo str_replace(BLOG_ROOT_DIR,BLOG_ROOT_URL,$row["pho_lit_img"]);?>" width="120" /></div></td>
	  		</tr>
	  		<tr>
	    		<td height="25"><input name="pho_title" type="text" style="width:120px;" value="<?php echo $row["pho_title"];?>" /></td>
	
	  		</tr>
			<tr>
	    		<td height="30">
					&nbsp;&nbsp;&nbsp;&nbsp;<input style="height:25px;" type="submit" value="更新">&nbsp;&nbsp;&nbsp;&nbsp;<a href="<?=$this->adminurl?>/photo/submitpho?action=del&id=<?=$row["pho_id"]?>">删除</a>
				</td>
	  		</tr>
		</table>
		<input type="hidden" name="pho_id" value="<?=$row["pho_id"]?>">
		<input type="hidden" name="action" value="edit">
	</form>
	</p>
	</TD>
	<?php
		$i++;
		if($i%5 == 0 && $j != count($this->paginator)){
			echo "</TR><TR BORDER='0' WIDTH='100%'>";
		}else{
			if($j == count($this->paginator) && $i%5 == 1){
				echo "<td></td><td></td><td></td><td></td>";
			}elseif($j == count($this->paginator) && $i%5 == 2){
				echo "<td></td><td></td><td></td>";
			}elseif($j == count($this->paginator) && $i%5 == 3){
				echo "<td></td><td></td>";
			}elseif($j == count($this->paginator) && $i%5 == 4){
				echo "<td></td>";
			}
		}
	}
	?>
	</TR>
  <TR BORDER="0" WIDTH="100%">
    <TD style="PADDING-LEFT: 8px; PADDING-TOP: 8px" vAlign=top align=left bgColor=#ffffff height=30></TD>
    </TR>
<tr><td>
<div class="page" style="margin-bottom:50px;margin-top:10px;">
<?=$this->paginationControl($this->paginator, 'Elastic', 'pagestyle.phtml'); ?>
</div>
</td>
</tr>
</TABLE>
<script language="JavaScript" >

function chkform(theForm,msg,action){
	if (confirm(msg)){

		document.forms[theForm].action.value = action;
		document.forms[theForm].submit();
		return true;
	}else{
		return false;
	}
}
</script>